
// This guard ensures that X11 implementation is used only
// on unix platform.
#ifndef MY_USE_UNIX

    #error Unix version of __FILE__ is used without MY_USE_UNIX defined.

#endif

#include "Core/Unix/ApplicationImp.hpp"

namespace My
{
    void ApplicationImp::Initialize()
    {
        // Todo : Standard behaviour wants the environnement variable
        // DISPLAY as argument for XOpenDisplay(). If it doesn't exist
        // use NULL.

        m_Display = ::XOpenDisplay(NULL);
        m_DefaultScreen = ::DefaultScreen(display);
        m_RootWindow = ::RootWindow(display,screen);
    }

    void ApplicationImp::Terminate()
    {
        ::XCloseDisplay(m_Display);
    }
}
